package com.example.exceldemo.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: yanhongwei
 * @Date: 2023/05/23 18:06:08
 * @Description: TODO
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("userexcel")
public class UserExcel implements Serializable {

//    @ExcelIgnore
    @ExcelProperty(value = "id",index = 0)
    private Long id;
    @ExcelProperty(value = "用户名",index = 1)
    private String name;
    @ExcelProperty(value = "年龄",index = 2)
    private Integer age;
    @ExcelProperty(value = "用户性别",index = 3)
    private String gender;
    @ExcelProperty(value = "用户出生日期",index = 4)
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date birthday;

}